﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using negocio.entidades;
using negocio.servicios;

namespace web.form
{
    public partial class Login : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void LinForm_Authenticate(object sender, AuthenticateEventArgs e)
        {
            UsuarioService usuarioService = new UsuarioService();
            if (usuarioService.EstaAutenticado(LinForm.UserName, LinForm.Password))
            {
                e.Authenticated = true;
            }
            else
            {
                e.Authenticated = false;
            }
        }
    }
}